package work.model.com.myapplication;

import android.app.Application;
import android.content.Context;
import android.support.multidex.MultiDex;

import com.meituan.android.walle.WalleChannelReader;
import com.tencent.bugly.Bugly;
import com.tencent.bugly.beta.Beta;

import static com.tencent.bugly.beta.tinker.TinkerManager.getApplication;


public class MyApplication extends Application {
    @Override
    public void onCreate() {
        super.onCreate();
        Bugly.init(this, "5d0ee568f8",true);
    }

    @Override
    protected void attachBaseContext(Context base) {
        super.attachBaseContext(base);

        String channel = WalleChannelReader.getChannel(getApplication());
        Bugly.setAppChannel(getApplication(), channel);
        // you must install multiDex whatever tinker is installed!
        MultiDex.install(base);

        // 安装tinker
        // TinkerManager.installTinker(this); 替换成下面Bugly提供的方法
        Beta.installTinker(this);
    }
}
